/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;
/**
 * 告警Entity
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_sub_return_order")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SubReturnOrder extends DataEntity {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer goodsId; // 参考商品资料
	private Integer returnFormId; // 销售人员编号
	private Integer customerId; // 客户ID
	private String returnTime; // 退货时间
	private String returnReason; // 退货原因

    
	  public Integer getGoodsId() {
        return goodsId;
      }
      
      public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
      }
    
	  public Integer getReturnFormId() {
        return returnFormId;
      }
      
      public void setReturnFormId(Integer returnFormId) {
        this.returnFormId = returnFormId;
      }
    
	  public Integer getCustomerId() {
        return customerId;
      }
      
      public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
      }
    
	  public String getReturnTime() {
        return returnTime;
      }
      
      public void setReturnTime(String returnTime) {
        this.returnTime = returnTime;
      }
    
	  public String getReturnReason() {
        return returnReason;
      }
      
      public void setReturnReason(String returnReason) {
        this.returnReason = returnReason;
      }
    
    
    // JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	} 
	
	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
